HTAGS(1)                    General Commands Manual                   HTAGS(1)



[1mNAME[0m
       htags - generate a hypertext from a set of source files

[1mSYNOPSIS[0m
       [1mhtags [22m[-aDfFghInosTvw][-d [4mdbpath[24m][-m [4mname[24m][-t [4mtitle[24m][[4mdir[24m]

[1mDESCRIPTION[0m
       [1mHtags  [22mgenerates  a  hypertext  from  a set of source files of C, Yacc,
       Java, PHP and assembly.

       In advance of using this command, you should execute  [1mgtags[22m(1)  in  the
       root  directory of a source project.  Then you can execute [1mhtags [22min the
       same place.  [1mHtags [22mmakes a directory named 'HTML', and puts a hypertext
       in it.  You can start browsing at 'HTML/index.html'.

       Since  [1mhtags  [22mgenerates a static hypertext as long as neither [1m-D [22mnor [1m-f[0m
       option is not specified, you can move it anywhere and browse it by  any
       browser  without  any HTTP server. If you use [1m-D [22mor [1m-f [22moption, you need
       to use HTTP  server.  Though  any  HTTP  server  is  available,  [1mhtags-[0m
       [1mserver[22m(1) is recommended.

       This  command has so many options.  If you are new to [1mhtags[22m, it is rec-
       ommended to use [1m--suggest [22moption.  With that option, [1mhtags [22mchooses pop-
       ular options on your behalf.

[1mOPTIONS[0m
       The following options are available:

       [1m-a[22m, [1m--alphabet[0m
              Make an alphabetical index suitable for a large project.

       [1m--auto-completion[22m[=[4mlimit[24m]
              Enable auto-completion facility for the input form.  If [4mlimit[24m is
              specified, number of candidates is limited to the value.  Please
              note this function requires javascript language in your browser.

       [1m-C[22m, [1m--directory [4m[22mdir[0m
              Change the directory before doing all the work including parame-
              ter analysis.

       [1m--caution[0m
              Display a caution message on the top page.

       [1m--cflow [4m[22mcflowfile[0m
              Add a call tree by [1mcflow[22m(1). [4mcflowfile[24m must be posix format.  If
              you use GNU [1mcflow[22m, invoke the command at the project root direc-
              tory with the [1m--format=posix [22moption.  This option is deprecated;
              please use [1m--call-tree [22mor [1m--callee-tree [22minstead.

       [1m--call-tree [4m[22mcallfile[0m
              Add  a call tree by [1mcflow[22m(1); [4mcallfile[24m must be posix format.  If
              you use GNU [1mcflow[22m, invoke the command at the project root direc-
              tory with the [1m--format=posix [22moption.

       [1m--callee-tree [4m[22mcalleefile[0m
              Add  a callee tree by [1mcflow[22m(1); [4mcalleefile[24m must be posix format.
              If you use GNU [1mcflow[22m, invoke the command at the project root di-
              rectory with the [1m--format=posix [22mand [1m--reverse [22moptions.

       [1m--colorize-warned-line[0m
              Use color to highlight warned lines.

       [1m--cvsweb [4m[22murl[0m
              Add  a link to cvsweb; [4murl[24m is used as the base of URL.  When di-
              rectory 'CVS' exists in the root directory of the  project,  the
              content  of  'CVS/Repository'  is used as the relative path from
              the base.

       [1m--cvsweb-cvsroot [4m[22mcvsroot[0m
              Specify cvsroot in cvsweb URL.

       [1m-D[22m, [1m--dynamic[0m
              Generate a tag list dynamically using CGI program.  Though  this
              option decreases both the size and generation time of hypertext,
              you need to start up HTTP server.

       [1m-d[22m, [1m--dbpath [4m[22mdbpath[0m
              Specify the directory in which 'GTAGS' exists.  The  default  is
              the current directory.

       [1m--disable-grep[0m
              Disable [1mgrep [22min the search form ([1m-f[22m, [1m--form[22m).

       [1m--disable-idutils[0m
              Disable [1midutils [22min the search form ([1m-f[22m, [1m--form[22m).

       [1m-F[22m, [1m--frame[0m
              Use frames for the top page.

       [1m-f[22m, [1m--form[0m
              Add  a  search form using CGI program.  You need to start a HTTP
              server for it.

       [1m--fixed-guide[0m
              Put a fixed guide at the bottom of the screen of the browser.

       [1m--full-path[0m
              Use full path name in the file index.  By default, use just  the
              last component of a path.

       [1m-g[22m, [1m--gtags[0m
              Execute [1mgtags[22m(1) before starting job.  The [1m-v[22m, [1m-w [22mand [4mdbpath[24m op-
              tions are passed to [1mgtags[22m.

       [1m--gtagsconf [4m[22mfile[0m
              Set environment variable [1mGTAGSCONF [22mto [4mfile[24m.

       [1m--gtagslabel [4m[22mlabel[0m
              Set environment variable [1mGTAGSLABEL [22mto [4mlabel[24m.

       [1m-h[22m, [1m--func-header[22m[=[4mposition[24m]
              Insert a function header for each function.  By  default,  [1mhtags[0m
              doesn't  generate them.  You can choose the position using [4mposi-[0m
              [4mtion[24m, which allows one of  'before',  'right'  or  'after'  (de-
              fault).

       [1m--help [22mPrint a usage message.

       [1m--html-header [4m[22mfile[0m
              Insert a header record derived from [4mfile[24m into the HTML header of
              each file.

       [1m-I[22m, [1m--icon[0m
              Use icons instead of text for some links.

       [1m--insert-footer [4m[22mfile[0m
              Insert custom footer derived from [4mfile[24m before </body> tag.

       [1m--insert-header [4m[22mfile[0m
              Insert custom header derived from [4mfile[24m after <body> tag.

       [1m--item-order [4m[22mspec[0m
              Specify the order of the items in the top page.  The [4mspec[24m  is  a
              string  consisting  of  item signs in order.  Each sign means as
              follows: 'c': caution; 's': search form; 'm': mains; 'd':  defi-
              nitions; 'f': files; 't': call tree.  The default is 'csmdf'.

       [1m-m[22m, [1m--main-func [4m[22mname[0m
              Specify startup function name; the default is 'main'.

       [1m--map-file[0m
              Generate file 'MAP'.

       [1m-n[22m, [1m--line-number[22m[=[4mcolumns[24m]
              Print  line  numbers. By default, don't print line numbers.  The
              default value of [4mcolumns[24m is 4.

       [1m--no-order-list[0m
              Numbers are not given in list form.

       [1m-o[22m, [1m--other[0m
              Pick up not only source files but also other files for the  file
              index.

       [1m-s[22m, [1m--symbol[0m
              Make  anchors  not  only for definitions and references but also
              other symbols.

       [1m--show-position[0m
              Print the position string per function  definition.  The  string
              can  be  interpreted  by general editors in UNIX. The default is
              false.

       [1m--statistics[0m
              Print statistics information.

       [1m--suggest[0m
              [1mHtags [22mchooses popular options on behalf  of  beginners.   It  is
              equivalent to [1m-aghInosTxv --show-position --fixed-guide [22mnow.

       [1m--suggest2[0m
              [1mHtags  [22mchooses popular options on behalf of beginners.  This op-
              tion enables frame, AJAX and CGI facility in addition to the fa-
              cilities by the [1m--suggest [22moption.  It is equivalent to [1m--suggest[0m
              [1m-DfF --auto-completion --tree-view=filetree [22mnow.

       [1m-T[22m, [1m--table-flist[22m[=[4mrows[24m]
              Use <table> tag to display the file index.  You  can  optionally
              specify the number of rows; the default is 5.

       [1m-t[22m, [1m--title [4m[22mtitle[0m
              Title  of  the  hypertext.  The default is the last component of
              the path of the current directory.

       [1m--tabs [4m[22mcols[0m
              Tab stops. The default is 8.

       [1m--table-list[0m
              Use <table> tag to display the tag list.

       [1m--tree-view[22m[=[4mtype[24m]
              Use treeview for the file index.  Please note this function  re-
              quires  javascript language in your browser.  Possible values of
              [4mtype[24m are as follows: [4mtreeview[24m, [4mfiletree[24m, [4mtreeview-red[24m, [4mtreeview-[0m
              [4mblack[24m,  [4mtreeview-gray[24m,  [4mtreeview-famfamfam[24m. The default is [4mtree-[0m
              [4mview[24m.

       [1m-v[22m, [1m--verbose[0m
              Verbose mode.

       [1m--version[0m
              Show version number.

       [1m-w[22m, [1m--warning[0m
              Print warning messages.

       [4mdir[24m    The directory in which the result of  this  command  is  stored.
              The default is the current directory.

[1mEXAMPLES[0m
       $ gtags -v
       $ htags -sanohITvt 'Welcome to XXX source tour!'
       $ firefox HTML/index.html

       $ htags --suggest2
       $ htags-server >& log &
       $ firefox http://127.0.0.1:8000

[1mFILES[0m
       'GTAGS'
              Tag file for definitions.

       'GRTAGS'
              Tag file for references.

       'GPATH'
              Tag file for source files.

       'gtags.conf', '$HOME/.globalrc'
              Configuration data for GNU Global.  See [1mgtags.conf[22m(5).

       'HTML/FILEMAP'
              Mapping file for converting file name into the path of the file.

       'HTML/GTAGSROOT'
              If  this  file exists, CGI program 'global.cgi' sets environment
              variable [1mGTAGSROOT [22mto the contents of it.  If you move directory
              'HTML' from the original place, please make this file.

       'HTML/.htaccess'
              Local configuration file for Apache. This file is generated when
              the [1m-f [22mor [1m-D [22moptions are specified.

       'HTML/index.html'
              Start-up file.

       'HTML/MAP'
              Mapping file for converting tag name into the path of tag list.

       'HTML/style.css'
              Style sheet file.

       '/usr/local/share/gtags/style.css.tmpl'
              The template of the style sheet file ('HTML/style.css').

[1mENVIRONMENT[0m
       The following environment variables affect the execution of [1mhtags[22m:

       [1mGTAGSCACHE[0m
              The size of the B-tree cache. The default is 50000000 (bytes).

       [1mGTAGSCONF[0m
              Configuration file.

       [1mGTAGSLABEL[0m
              Configuration label. The default is 'default'.

       [1mHTAGS_OPTIONS[0m
              The value of this variable is inserted in the head of arguments.

       [1mTMPDIR [22mThe location used to stored  temporary  files.  The  default  is
              '/tmp'.

       [1mGTAGSFORCECPP[0m
              If  this  variable  is  set,  each  file whose suffix is '.h' is
              treated as a C++ source file.

[1mCONFIGURATION[0m
       The following configuration variables affect the execution of [1mhtags[22m:

       datadir(string)
              Shared data directory. The default is '/usr/local/share' but you
              can  change  the  value  using configure script.  [1mHtags [22mlooks up
              template files in the 'gtags' directory in this data directory.

       include_file_suffixes(comma separated list)
              Suffixes of include files. The default is:
              'h,hh,hxx,hpp,H,inc.php'.

       langmap(comma separated list)
              Language mapping. Each comma-separated map consists of the  lan-
              guage  name,  a  colon,  and a list of file extensions.  Default
              mapping is:
              'c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml'.

[1mDIAGNOSTICS[0m
       [1mHtags [22mexits with a non-0 value if an error occurred, 0 otherwise.

[1mSEE ALSO[0m
       [1mhtags-server[22m(1), [1mglobal[22m(1), [1mgtags[22m(1), [1mgtags.conf[22m(5).

       GNU Global source code tag system
       (http://www.gnu.org/software/global/).

[1mBUG[0m
       Generated hypertext is VERY LARGE.  In advance, check the space of your
       disk.

       PHP support is far from complete.

       The [1m-f [22mand [1m-D [22moptions generate CGI programs.  If you open the hypertext
       to the public, please recognize security dangers.

       Htags does not support plug-in parser.

[1mAUTHOR[0m
       Shigio YAMAGUCHI, Hideki IWAMOTO and others.

[1mHISTORY[0m
       The [1mhtags [22mcommand appeared in FreeBSD 2.2.2.



GNU Project                        June 2013                          HTAGS(1)
